Gerrit +2 code review label is not visible - gerrit

I am a newbie for Gerrit. Just started code review on Gerrit.
For some of the repositories i am able to see +2 code review label
But for some of the repositories it is not visible.
Could some one please help me to identify the reason of it.
I have checked the my permission status. I have admin role.
Edit : If some one reviewed the code with +1 code review label and +1 verified, it is not showing submit button
Could some one please help me to understand this as well.

In my case I set it visible by 'Repo Settings'
RepoSettings -- Access -- Reference:refs/* -- Label Code-Review -- Allow -- select a Group or User -- Save
Ensure your account belongs to the group then can make a Code Review +1/+2

I got the solution of this we can do it by editing the project.config file.
Click on edit config button and add the give the parameters like this.
[label "Your-Label-Here"]
function = MaxWithBlock
value = -1 Your -1 Description
value = 0 Your No score Description
value = +1 Your +1 Description
for more info please check snapshot of given file
[access "refs/*"]
read = group DA-Admins
read = group Registered Users
forgeAuthor = group Registered Users
label-Verified = -1..+1 group Registered Users
create = group Pushers
forgeCommitter = group Pushers
forgeServerAsCommitter = group Pushers
push = +force group Pushers
pushMerge = group Pushers
pushTag = group Pushers
pushSignedTag = group Pushers
[access "refs/for/*"]
push = group Registered Users
pushMerge = group Registered Users
[access "refs/heads/*"]
label-Code-Review = -2..+2 group Project Owners
label-Code-Review = -1..+1 group Registered Users
label-Code-Review = block -2..+2 group Change Owner
label-Verified = -1..+1 group Registered Users
submit = group Project Owners
[access "refs/meta/config"]
read = group Registered Users
label-Code-Review = -2..+2 group Administrators
label-Code-Review = -2..+2 group Project Owners
submit = group Administrators
submit = group Project Owners
[access "refs/tags/*"]
create = group Project Owners
pushTag = group Project Owners
[access "refs/notes/review"]
push = group Registered Users
[receive]
requireChangeId = true
[submit]
mergeContent = true
[project]
description = This is a description
[label "Code-Review"]
function = MaxWithBlock
abbreviation = R
copyMinScore = true
value = -2 Do not submit
value = -1 I would prefer that you didn't submit this
value = 0 No score
value = +1 Looks good to me, but someone else must approve
value = +2 Looks good to me, approved
copyAllScoresOnTrivialRebase = true
copyAllScoresIfNoCodeChange = true
defaultValue = 0

Related

Can't preserve document core metadata (Created By, Modified By) when I import documents to SharePoint Document Library

I'm currently building a tool to migrate from a document management system to use SharePoint Online. The main challenge I'm facing is to preserve the details of document authors and creating time. I have checked bunch of of code online but I didn't get success with any of them.
Here are the approaches I used
SharePoint Rest API
Microsoft Graph API
CSOM (using console application)
Here is the code I have so far in CSOM but I'm still not able to update the Author field
li["Title"] = "Update from CSOM";
li["Created"] = DateTime.Now.AddYears(-5);
li["Author"] = author.Id;
li.UpdateOverwriteVersion();
clientContext.ExecuteQuery();
Any idea for how to do this, or if there is any other approach to achieve my goal?
The code works when I did test in my environment.
using (ClientContext context = new ClientContext("https://xxx.sharepoint.com/sites/lee"))
{
string s = "password";
SecureString passWord = new SecureString();
foreach (var c in s)
passWord.AppendChar(c);
context.Credentials = new SharePointOnlineCredentials("admin#xxx.onmicrosoft.com", passWord);
var author = context.Web.EnsureUser("Lee#xxx.onmicrosoft.com");
context.Load(author);
context.ExecuteQuery();
var _List = context.Web.Lists.GetByTitle("List1");
var li = _List.GetItemById(1);
li["Title"] = "Update from CSOM";
li["Created"] = DateTime.Now.AddYears(-5);
li["Author"] = author.Id;
li.UpdateOverwriteVersion();
context.ExecuteQuery();
}
You will need to update the Author and Editor fields at the same time in order to update the CreatedBy field. If you wish to update additional fields at the same time you can. Using SystemUpdate() does not update the Modified date whereas Update() does update the Modified date. See abbreviated sample below.
FieldUserValue userValue = new FieldUserValue();
User newUser = cc.Web.EnsureUser("newAuthor#xxx.onmicrosoft.com");
cc.Load(newUser);
cc.ExecuteQuery();
userValue.LookupId = newUser.Id;
item["Author"] = userValue;
item["Editor"] = userValue;
item.SystemUpdate();
cc.ExecuteQuery();

Jira Search - Ticket Id starts with "" & Other filters

How to Search Jira Tickets starts with "KN-" and Labels = 'Some Text' and Status = OPEN
How to achieve this
project in (KN) and labels = "Some text" and status = Open
Jira issue keys start with the project key
Working below query:
project in (KN) AND component = "Data Work" and status = Open ORDER BY updated DESC

Masterdata Services udpValidateModel Procedure

i've got a few tables in MDS.
One table (clients) ist filled via SQL and the other one is a masterdata table (country) filled by hand.
I have a business rule on table clients:
"Name must be unique" and no b-rule on Country.
I want to validate the data PROGRAMMATICALLY i do not want to CLICK "apply business rules" in explorer window on the webinterface.
I found several threads about how to use the sp mentioned in the title (udpValidateModel) to validate all entities in a model.
well...this thing does nothing. I can see the validationStatus in each of my tables "Awaiting Revalidation" after changing business rules or update data via sql. It doesnt matter what i do the status wont change (neither the validation icons in webui).
i also tried validateentity but the same "nothing" happens.
The SP below:
DECLARE #User_ID int
DECLARE #Model_ID int
DECLARE #Version_ID int
SET #User_ID = (SELECT ID FROM [MasterDataServices].[mdm].[tblUser] where userName = SYSTEM_USER )
SET #Model_ID = (SELECT Top 1 Model_Id FROM [MasterDataServices].[mdm].[viw_SYSTEM_SCHEMA_VERSION]
WHERE Model_MUID = 'MYMODELID')
SET #Version_ID = (SELECT Top 1 VersionNbr FROM [MasterDataServices].[mdm].[viw_SYSTEM_SCHEMA_VERSION]
WHERE Model_MUID = 'MYMODELID'
ORDER BY ID DESC )
EXECUTE [MasterDataServices].[mdm].[udpValidateModel] #User_ID, #Model_ID, #Version_ID, 1
Can anyone help?
SP 'udpValidateModel' works perfectly fine, looks like the parameters you are populating is not correct.
You may correct this as below and try; make sure that the system user has full authorization for the model.
SET #User_ID = (SELECT ID FROM [MasterDataServices].[mdm].[tblUser] where userName = SYSTEM_USER )
SET #Model_ID = (SELECT Top 1 Model_Id FROM [MasterDataServices].[mdm].[viw_SYSTEM_SCHEMA_VERSION]
WHERE Model_MUID = 'MYMODELID')
SET #Version_ID = (SELECT Top 1 VersionNbr FROM [MasterDataServices].[mdm].[viw_SYSTEM_SCHEMA_VERSION]
WHERE Model_MUID = #Model_ID
ORDER BY ID DESC )

How do I show an in app purchase price in local currency

Just wondering what I need to call to show the price in local currency of my in app purchase. Eg, in Australia I would like to have a button / label that shows $1.29 (tier 1) but if somebody in North America is using the app, it will show $0.99 (tier 1).
This is for iOS.
Thanks in advance.
When you use the store library, you can call the function "loadProducts" to get the available items for sale. Each item entry has a field "localizedPrice" that is a string representing the price according to the user's apple store.
for example, for ios:
local productIds = {
--array of your product identifiers, as you defined them in iTunes Connect
}
local function loadProductsCallback( event )
local validProducts = event.products
local invalidProducts = event.invalidProducts
if validProducts ~= nil then
for i = 1, #validProducts do
local currentItem = validProducts[i]
-- here do what you want with currentItem.localizedPrice
end
end
end
local store = require("store")
store.init("apple", storeListener)
if store.isActive and store.canLoadProducts then
store.loadProducts(productIds, loadProductsCallback)
End
You can read more about it in the documentation:
http://docs.coronalabs.com/api/library/store/loadProducts.html

JNDI Help regarding group group membership in Active Directory

I am trying to add a group to a different group in Active Directory using a JNDI program. On doing so, I get the following error
[LDAP: error code 53 - 00002142:
SvcErr: DSID-031A0FC0, problem 5003
(WILL_NOT_PERFORM), data 0
The code snippet I am using is below
Setting Group Attributes
Attributes attrs = new BasicAttributes(true);
attrs.put("objectClass","group")
attrs.put("description","A test group");
Adding group to different group
try{
ModificationItem member[] = new ModificationItem[1];
member[0]= new ModificationItem(DirContext.ADD_ATTRIBUTE, new BasicAttribute("member", groupDN));
ctx.modifyAttributes(grpDN,member);
System.out.println("Added group to group: " + grpDN);
}catch (NamingException e) {
System.err.println("Problem adding group to group: " + e);
}
I am able to add User to groups using almost the same type of code (below).
Setting User Attributes
// Create attributes to be associated with the new user
Attributes attrs = new BasicAttributes(true);
attrs.put("objectClass","user");
attrs.put("samAccountName","Perry");
attrs.put("cn","Perry");
attrs.put("givenName","Perry");
attrs.put("sn","Perry");
attrs.put("displayName","Perry Peterson");
attrs.put("description","Research Engineer");
int UF_ACCOUNTDISABLE = 0x0002;
int UF_PASSWD_NOTREQD = 0x0020;
int UF_PASSWD_CANT_CHANGE = 0x0040;
int UF_NORMAL_ACCOUNT = 0x0200;
int UF_DONT_EXPIRE_PASSWD = 0x10000;
int UF_PASSWORD_EXPIRED = 0x800000;
attrs.put("userAccountControl",Integer.toString(UF_NORMAL_ACCOUNT + UF_PASSWD_NOTREQD + UF_PASSWORD_EXPIRED+ UF_ACCOUNTDISABLE));
Adding User to Groups
try{
ModificationItem member[] = new ModificationItem[1];
member[0]= new ModificationItem(DirContext.ADD_ATTRIBUTE, new BasicAttribute("member", userDN));
ctx.modifyAttributes(groupDN,member);
System.out.println("Added user to group: " + groupName);
}catch (NamingException e){
System.err.println("Problem adding user to group: " + e);
}
Does any one has idea about what I am doing wrong here or is there any attribute that has to be set for groups also as in the case of Users. I have a SSL connection between my JNDI client and the server and I am able to successfully reset User password (that will not be possible if SSL is not there)
I suspect this is happening because the group I have created earlier are not created properly
Regards
Perry
This is happening as the Groups are created as Security Groups by default and it is not possible to add Groups to Groups (in case of Security Groups)
If you want to have nested groups, create groups as universal distribution and then only you will be able to add groups to groups
This behavior is for Active Directory. I am not aware of Other directories.

Resources