The priorities didn't set right when doing a Trac import, so I am just updating them via SQL. Sadly my UPDATE is changing all issues, and not the ones I want.
I want update priority based on what the stringvalue in a customefield. This is what I tried and it just updated priority for all issues.
UPDATE
jiraissue
SET priority = 1
From customfieldvalue
WHERE customfieldvalue.stringvalue = 'Blocking'
Any suggestions
You need a valid join from jiraissue to customfieldvalue don't you. Something like
update jiraissue SET priority=1 where id in (select ji.id from jiraissue ji join customfieldvalue cfv on cfv.ID = ji.ID where cfv.stringvalue = 'Blocking');
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.